class WxRequest {
  constructor() { }
  request(options) {
    return new Promise((resolve, reject) => {
      wx.request({
        ...options,
        success: function (res) {
          resolve(res)
        },
        error: function (error) {
          reject(error)
        }
      })
    })
  }
}
const instance = new WxRequest()
export { instance }